package com.three.storemanage.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.three.core.entity.CarWashRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
* @author 86156
* @description 针对表【tb_car_wash_record(消费洗车表)】的数据库操作Mapper
* @createDate 2025-03-17 19:50:17
* @Entity com.aaa.entity.CarWashRecord
*/
@Mapper
public interface CarWashRecordMapper extends BaseMapper<CarWashRecord> {

    int deleteByPrimaryKey(Long id);

    int insert(CarWashRecord record);

    int insertSelective(CarWashRecord record);

    CarWashRecord selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CarWashRecord record);

    int updateByPrimaryKey(CarWashRecord record);

    List<CarWashRecord> selectByStoreId(Integer storeId);

    List<CarWashRecord> selectByUserId(Integer userId);

    Integer countByUserId(Integer userId);

    List<CarWashRecord> selectByUserIdAndDate(
            @Param("userId") Integer userId,
            @Param("createDate") Date createDate
    );

    int updatewashStatusByOrderId(Integer orderId);

    int updateisUsedByOrderId(Integer orderId);

    int updateisUsedByOrderId2(Integer orderId);
}
